from django.db import models
from django import forms
from django.contrib.auth.models import User

class Track(models.Model):
    user = models.ForeignKey(User)
    title = models.CharField(max_length=30)
    artist = models.CharField(max_length=30)
    album = models.CharField(max_length=30)
    data = models.FileField(upload_to='tracks')

class TrackForm(forms.ModelForm):
    class Meta:
        model = Track
        exclude = ('user',)

